1. Field of the Invention
The present invention relates to an image processing device, an image compression method, a computer-readable image compression program, and a computer-readable recording medium which carry out compression encoding of image data.
2. Description of the Relater Art
The size of image data generally is large, and conventionally, various image processing methods for carrying out compression encoding of image data to reduce the size of image data have been proposed. Reduction of the size of image data enables effective utilization of hardware resources, and the loads of a network where the image data is transmitted can be reduced.
For example, Japanese Patent No. 2791314 (which is called reference 1) discloses an image processing method wherein it is detected whether the document is a color document or a monochrome document, and a method of compressing image data of the document is changed according to a result of the detection.
Japanese Published Patent Application No. 06-014213 (which is called reference 2) or Japanese Laid-Open Patent Application No. 2002-010094 (which is called reference 3) discloses an image processing method wherein it is detected whether the document is a color document or a monochrome document, and a printing unit for printing an image of the document to paper is changed according to a result of the detection.
Japanese Laid-Open Patent Application No. 10-155076 (which is called reference 4) discloses an image processing method wherein it is detected whether the document is a color document or a monochrome document, it is also detected whether the document contains a photographic image, and a printing unit for printing an image of the document to paper is changed according to a result of the detection.
Japanese Laid-Open Patent Application No. 08-065530 (which is called reference 5) discloses an image processing method wherein it is detected whether the document is a color document or a monochrome document, and a printing unit for printing an image of the document to paper is changed according to a result of the detection.
Japanese Laid-Open Patent Application No. 06-197218 (which is called reference 6) discloses an image processing method wherein it is detected at the time of pre-scanning of a document whether the document contains a pattern of silver-salt film photograph or a pattern of halftone dot photograph, or contains both the patterns, and a group of color correction coefficients is changed based on a result of the detection, so that the optimal color correction is performed.
Japanese Laid-Open Patent Application No. 2001-358950 (which is called reference 7) or Japanese Laid-Open Patent Application No. 2000-232589 (which is called reference 8) discloses an image processing method wherein the image format is changed according to a kind of destination transmission device.
Japanese Laid-Open Patent Application No. 09-247419 (which is called reference 9) discloses an image processing method wherein the transmitting image format is changed according to whether the document is a color document or a monochrome document. Also disclosed is that when the document type is detected as being a copy document by the document type judgment, the printing of a trace pattern is not performed.
However, in the case of reference 1, even when the document is a monochrome document, the compression method which is suitable for the document is varied depending on whether the document contains a photograph or not.
For example, if binarization of a monochrome image containing no photograph is performed and the MMR (modified modified relative-element-address-designate) compression encoding is performed, the quality of image does not deteriorate and the compression efficiency is adequate. However, in the case of a monochrome image containing a photograph, if the same compression method is performed, fine noises remain in the photographic area of a copy and the quality of image deteriorates sharply.
In the cases of references 2 through 5, the compression efficiency is not taken into consideration.
When an irreversible compression method, such as the compression of JPEG (joint photographic experts group) files, is performed, it is possible to generate a file of compressed image data with a small size and obtain a high compressibility. This JPEG method is effective to images containing patterns, but it is not suitable for compression of binary images, like character images. If the JPEG method is performed for binary images, the edges of characters will fade and the readability of characters will deteriorate.
To obviate the problem, an image processing method as disclosed in Japanese Laid-Open Patent Application No. 2002-368986 (which is called reference 10) or Japanese Patent No. 3193086 (which is called reference 11) has been proposed. In this image processing method, the image data is separated into a first image plane (pattern area), a second image plain (color information of character area), and a selection image plain (shape of character area). A resolution of each of these image planes is converted by the three resolution conversion parts respectively. The image planes after the conversion of resolution are compressed by the three compression parts respectively and they are combined into one file. It is possible to maintain a high resolution of the character area and creates a high compressibility of the pattern area.
However, when the document is a monochrome document with only characters, the multi-level image data of the two image planes is unnecessary, and the compression efficiency will deteriorate. In the case of a monochrome document with only characters, if the binarization is performed and the MMR compression is performed, the compression efficiency is adequate and the quality of image is appropriate. However, in the case of a color document, if the MMR compression is performed, the color is lost and such a compression method is not practical. In addition, at the time of the binarization, noises may remain in the photographic area of a copy, and the compressibility in such a case will deteriorate.